#include "svpwm.hpp"
#include <cmath>
#include <cstdio>

int main(){
    double alpha = 0;
    double beta = 0;
    SVPWM svpwm;
    for ( int n = 0; n < 360; n++ ){
        double angle = n;
        double radian = angle * M_PI / 180.0;
        alpha = cos(radian) / 1.73205080757 * 0.5;
        beta = sin(radian) / 1.73205080757 * 0.5;
        SVPWM::Result result = svpwm.calculate(alpha,beta);
        printf("%f,%f,%f\n",result.p_a,result.p_b,result.p_c);
    }
    
    return 0;
}